﻿@model FilmBookingTicket.Models.Film

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";

}
<h2>Thêm Phim</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
      
    <table class="table striped bordered hovered" style="margin :0px 0px 0px 40px">
        <tr>
            <td style="padding: 0px 10px 0px 20px">
                <div>
                    @Html.LabelFor(model => model.Name)
                </div>
                <div class="input-control text">
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </td>
            <td style="padding: 0px 20px 0px 10px">
                <div>
                    @Html.LabelFor(model => model.Length)
                </div>
                <div class="input-control text">
                    @Html.EditorFor(model => model.Length)
                    @Html.ValidationMessageFor(model => model.Length)
                </div>
            </td>
        </tr>
        <tr>
            <td style="padding: 0px 10px 0px 20px">
                <div>
                    @Html.LabelFor(model => model.Nation)
                </div>
                <div class="input-control text">
                    @Html.EditorFor(model => model.Nation)
                    @Html.ValidationMessageFor(model => model.Nation)
                </div>
            </td>
            <td style="padding: 0px 20px 0px 10px">
                <div>
                    @Html.LabelFor(model => model.Director)
                </div>
                <div class="input-control text">
                    @Html.EditorFor(model => model.Director)
                    @Html.ValidationMessageFor(model => model.Director)
                </div>
            </td>
        </tr>
        <tr>
            <td style="padding: 0px 10px 0px 20px">
                <div>
                    @Html.LabelFor(model => model.AgeLimit)
                </div>
                <div class="input-control text">
                    @Html.EditorFor(model => model.AgeLimit)
                    @Html.ValidationMessageFor(model => model.AgeLimit)
                </div>
            </td>
         @*   <td style="padding: 0px 10px 0px 20px">
                <div>
                    @Html.LabelFor(model => model.ActorId, "Actor")
                </div>
                <div class="input-control text">
                    @Html.DropDownList("ActorId", String.Empty)
                    @Html.ValidationMessageFor(model => model.ActorId)
                </div>
                <div>
                    
                </div>
            </td>*@

        </tr>
        <tr>
            <td style="padding: 0px 10px 0px 20px">
                <div>
                    @Html.LabelFor(model => model.CategoryId, "Category")
                </div>
                <div class="input-control select">
                    @Html.DropDownList("CategoryId", String.Empty)
                    @Html.ValidationMessageFor(model => model.CategoryId)
                </div>
                <a href="#" onclick="ActiveCate()">Thêm Thể Loại</a>
            </td>
            <td style="padding: 0px 10px 0px 20px">
                <div>
                    @Html.LabelFor(model => model.FormatId, "Format")
                </div>
                <div class="input-control select">
                    <div>
                        @Html.DropDownList("FormatId", String.Empty)
                        @Html.ValidationMessageFor(model => model.FormatId)
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td style="padding: 0px 10px 0px 20px" colspan="2">
                <div>
                    @Html.LabelFor(model => model.Description)
                </div>
                <div class="input-control textarea">
                    @Html.TextAreaFor(model => model.Description)
                    @Html.ValidationMessageFor(model => model.Description)
                </div>
            </td>
        </tr>
        <tr>
            <td style="padding: 0px 10px 0px 20px" colspan="2">
                <div>
                    @Html.LabelFor(model => model.ImageURL)
                </div>
                <div class="input-control file info-state" data-role="input-control">
                    <input type="file" tabindex="-1" style="z-index: 0;"><input type="text" id="__input_file_wrapper__" readonly="" style="z-index: 1; cursor: default;">
                    <button class="btn-file" type="button"></button>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input class="info" type="submit" value="Create" />
            </td>
        </tr>
        <tr>
            <td>
                <div>
                    @Html.ActionLink("Back to List", "Index")
                </div>

            </td>
        </tr>
    </table>    
   
}
 @Html.Partial("~/Views/Film/FilmPartial.cshtml")
<script>
   function ActiveCate() {
        var cate = document.getElementById("category");
        cate.setAttribute("style", "display:normal;position:absolute;top:305px;right:355px");
    }
</script>



